package com.design03_behavioral.pattern17_state.example03;

/**
 * @ClassName Yellow
 * @Description TODO
 * @Author zhangjunhao
 * @DATE 2023/9/9 3:17
 */
public class Yellow implements State {
    @Override
    public void switchToGreen(TrafficLight trafficLight) {
        System.out.println("绿灯亮起...时长:60秒!");
    }

    @Override
    public void switchToYellow(TrafficLight trafficLight) {
        System.out.println("已是黄灯无须切换!");
    }

    @Override
    public void switchToRed(TrafficLight trafficLight) {
        System.out.println("红灯亮起...时长:90秒!");
    }
}
